import { defineConfig } from 'vite'
import Components from 'unplugin-vue-components/vite';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  define: {
    __VUE_I18N_FULL_INSTALL__: true, __VUE_I18N_LEGACY_API__: true, __INTLIFY_PROD_DEVTOOLS__: false,
    'process.env':{
      // 'BASE_URL':'http://120.27.152.202:8082/zhonggu'
      'BASE_URL':'http://192.168.0.199:8082/zhonggu'
    }
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  plugins: [
    vue(),
    Components({
      resolvers: [
        AntDesignVueResolver({
          importStyle: false, // css in js

          
        }),
      ],
    })
  ],
  server: {
    host: '0.0.0.0' //dev 环境  可以用本机ip地址访问
  }
})
